﻿#ifndef MAINFACE_H
#define MAINFACE_H

#include <QWidget>
#include <QCloseEvent>
#include <QPainter>

namespace Ui {
class MainFace;
}

class MainFace : public QWidget
{
    Q_OBJECT

public:
    explicit MainFace(QWidget *parent = nullptr);
    ~MainFace();

protected:
    void closeEvent(QCloseEvent * event)override;

    void paintEvent(QPaintEvent *event) override
    {
        QPainter painter(this);
        QPixmap background(":/img/1.jpg");
        painter.drawPixmap(0, 0, width(), height(), background);
        QWidget::paintEvent(event);
    }

signals:
    void closeFace();

private:
    Ui::MainFace *ui;
};

#endif // MAINFACE_H
